home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1995 August / macformat-027.iso / mac / Shareware City / Developers / Oberon⁄F / Manuals / Quick Reference (.txt) < prev    next >
Encoding:
Oberon Document  |  1994-06-07  |  19.8 KB  |  524 lines  |  [oODC/obnF]

  1. Documents.StdDocumentDesc
  2. Documents.DocumentDesc
  3. Containers.ViewDesc
  4. Views.ViewDesc
  5. Stores.StoreDesc
  6. Documents.ModelDesc
  7. Containers.ModelDesc
  8. Models.ModelDesc
  9. Stores.ElemDesc
  10. TextViews.StdViewDesc
  11. TextViews.ViewDesc
  12. TextModels.StdModelDesc
  13. TextModels.ModelDesc
  14. TextModels.AttributesDesc
  15. Geneva
  16. Geneva
  17. Quick Reference
  18. DEFINITION Domains;
  19.     TYPE
  20.         Operation = POINTER TO OperationDesc;
  21.         OperationDesc = RECORD 
  22.             PROCEDURE (op: Operation) Do
  23.         END;
  24. END Domains.
  25. DEFINITION Files;
  26.     CONST shared = TRUE;
  27.     TYPE
  28.         Name = ARRAY 32 OF CHAR;
  29.         Type = ARRAY 8 OF CHAR;
  30.         Locator = POINTER TO LocatorDesc;
  31.         LocatorDesc = RECORD
  32.             res: LONGINT;
  33.             PROCEDURE (l: Locator) This (path: ARRAY OF CHAR): Locator
  34.         END;
  35.         File = POINTER TO FileDesc;
  36.         FileDesc = RECORD
  37.             PROCEDURE (f: File) Length (): LONGINT;
  38.             PROCEDURE (f: File) NewReader (old: Reader): Reader;
  39.             PROCEDURE (f: File) NewWriter (old: Writer): Writer;
  40.             PROCEDURE (f: File) Register (name: Name; type: Type; VAR res: LONGINT)
  41.         END;
  42.         Reader = POINTER TO ReaderDesc;
  43.         ReaderDesc = RECORD
  44.             eof: BOOLEAN;
  45.             PROCEDURE (r: Reader) Base (): File;
  46.             PROCEDURE (r: Reader) Pos (): LONGINT;
  47.             PROCEDURE (r: Reader) SetPos (pos: LONGINT);
  48.             PROCEDURE (r: Reader) ReadByte (VAR x: CHAR);
  49.             PROCEDURE (r: Reader) ReadBytes (VAR x: ARRAY OF CHAR; beg, len: LONGINT)
  50.         END;
  51.         Writer = POINTER TO WriterDesc;
  52.         WriterDesc = RECORD
  53.             PROCEDURE (w: Writer) Base (): File;
  54.             PROCEDURE (w: Writer) Pos (): LONGINT;
  55.             PROCEDURE (w: Writer) SetPos (pos: LONGINT);
  56.             PROCEDURE (w: Writer) WriteByte (x: CHAR);
  57.             PROCEDURE (w: Writer) WriteBytes (VAR x: ARRAY OF CHAR; beg, len: LONGINT)
  58.         END;
  59.         Directory = POINTER TO DirectoryDesc;
  60.         DirectoryDesc = RECORD
  61.             PROCEDURE (d: Directory) This (path: ARRAY OF CHAR): Locator;
  62.             PROCEDURE (d: Directory) Temp (): File;
  63.             PROCEDURE (d: Directory) New (loc: Locator): File;
  64.             PROCEDURE (d: Directory) Old (loc: Locator; name: Name; shared: BOOLEAN): File;
  65.             PROCEDURE (d: Directory) Delete (loc: Locator; name: Name);
  66.             PROCEDURE (d: Directory) Rename (loc: Locator; old, new: Name)
  67.         END;
  68.     VAR dir-: Directory;
  69. END Files.
  70. DEFINITION Fonts;
  71.     CONST
  72.         mm = 36000; point = LONG(12700);
  73.         italic = 0; underline = 1; strikeout = 2;
  74.         normal = 400; bold = 700;
  75.     TYPE
  76.         Typeface = ARRAY 32 OF CHAR;
  77.         Font = POINTER TO FontDesc;
  78.         FontDesc = RECORD
  79.             asc, dsc: LONGINT;
  80.             PROCEDURE (f: Font) StringWidth (s: ARRAY OF CHAR): LONGINT
  81.         END;
  82.         Directory = POINTER TO DirectoryDesc;
  83.         DirectoryDesc = RECORD
  84.             PROCEDURE (d: Directory) This (typeface: Typeface; size: LONGINT;
  85.                                                             style: SET; weight: INTEGER): Font;
  86.             PROCEDURE (d: Directory) Default (): Font
  87.         END;
  88.     VAR dir-: Directory;
  89. END Fonts.
  90. DEFINITION Stores;
  91.     IMPORT Files;
  92.     CONST alienComponent = 2;
  93.     TYPE
  94.         Store = POINTER TO StoreDesc;
  95.         StoreDesc = RECORD
  96.             PROCEDURE (s: Store) Clone (): Store;
  97.             PROCEDURE (s: Store) Internalize (VAR rd: Reader);
  98.             PROCEDURE (s: Store) Externalize (VAR wr: Writer)
  99.         END;
  100.         Elem = POINTER TO ElemDesc;
  101.         ElemDesc = RECORD (StoreDesc) END;
  102.         Reader = RECORD
  103.             cancelled-: BOOLEAN;
  104.             PROCEDURE (VAR rd: Reader) ConnectTo (f: Files.File);
  105.             PROCEDURE (VAR rd: Reader) Pos (): LONGINT;
  106.             PROCEDURE (VAR rd: Reader) SetPos (pos: LONGINT);
  107.             PROCEDURE (VAR rd: Reader) ReadBool (VAR x: BOOLEAN);
  108.             PROCEDURE (VAR rd: Reader) ReadChar (VAR x: CHAR);
  109.             PROCEDURE (VAR rd: Reader) ReadSInt (VAR x: SHORTINT);
  110.             PROCEDURE (VAR rd: Reader) ReadInt (VAR x: INTEGER);
  111.             PROCEDURE (VAR rd: Reader) ReadLInt (VAR x: LONGINT);
  112.             PROCEDURE (VAR rd: Reader) ReadReal (VAR x: REAL);
  113.             PROCEDURE (VAR rd: Reader) ReadLReal (VAR x: LONGREAL);
  114.             PROCEDURE (VAR rd: Reader) ReadSet (VAR x: SET);
  115.             PROCEDURE (VAR rd: Reader) ReadString (VAR x: ARRAY OF CHAR);
  116.             PROCEDURE (VAR rd: Reader) ReadStore (VAR x: Store);
  117.             PROCEDURE (VAR rd: Reader) ReadVersion (min, max: SHORTINT; VAR version: SHORTINT);
  118.             PROCEDURE (VAR rd: Reader) TurnIntoAlien (cause: LONGINT)
  119.         END;
  120.         Writer = RECORD
  121.             PROCEDURE (VAR wr: Writer) ConnectTo (f: Files.File);
  122.             PROCEDURE (VAR wr: Writer) Pos (): LONGINT;
  123.             PROCEDURE (VAR wr: Writer) SetPos (pos: LONGINT);
  124.             PROCEDURE (VAR wr: Writer) WriteBool (x: BOOLEAN);
  125.             PROCEDURE (VAR wr: Writer) WriteChar (x: CHAR);
  126.             PROCEDURE (VAR wr: Writer) WriteSInt (x: SHORTINT);
  127.             PROCEDURE (VAR wr: Writer) WriteInt (x: INTEGER);
  128.             PROCEDURE (VAR wr: Writer) WriteLInt (x: LONGINT);
  129.             PROCEDURE (VAR wr: Writer) WriteReal (x: REAL);
  130.             PROCEDURE (VAR wr: Writer) WriteLReal (x: LONGREAL);
  131.             PROCEDURE (VAR wr: Writer) WriteSet (x: SET);
  132.             PROCEDURE (VAR wr: Writer) WriteString (x: ARRAY OF CHAR);
  133.             PROCEDURE (VAR wr: Writer) WriteStore (x: Store);
  134.             PROCEDURE (VAR wr: Writer) WriteVersion (version: SHORTINT)
  135.         END;
  136.     PROCEDURE Clone (s: Store): Store;
  137. END Stores.
  138. DEFINITION Ports;
  139.     IMPORT Fonts;
  140.     CONST
  141.         black = 00000000H; white = 00FFFFFFH;
  142.         grey6 = 00F0F0F0H; grey12 = 00E0E0E0H; grey25 = 00C0C0C0H;
  143.         grey50 = 00808080H; grey75 = 00404040H;
  144.         red = 000000FFH; green = 0000FF00H; blue = 00FF0000H;
  145.         defaultColor = 01000000H;
  146.         mm = 36000; point = LONG(12700); inch = 914400;
  147.         fill = -1;
  148.         openPoly = 0; closedPoly = 1; openBezier = 2; closedBezier = 3;
  149.         hilite = 1; dim25 = 2; dim50 = 3; dim75 = 4;
  150.         hide = FALSE; show = TRUE;
  151.         arrowCursor = 0; textCursor = 1; graphicsCursor = 2; tableCursor = 3; bitmapCursor = 4;
  152.         keepBuffer = FALSE; disposeBuffer = TRUE;
  153.     TYPE
  154.         Color = LONGINT;
  155.         Point = RECORD
  156.             x, y: LONGINT
  157.         END;
  158.         Frame = POINTER TO FrameDesc;
  159.         FrameDesc = RECORD
  160.             unit-, dot-: LONGINT;
  161.             PROCEDURE (f: Frame) DrawRect (l, t, r, b, s: LONGINT; col: Color);
  162.             PROCEDURE (f: Frame) DrawOval (l, t, r, b, s: LONGINT; col: Color);
  163.             PROCEDURE (f: Frame) DrawLine (x0, y0, x1, y1, s: LONGINT; col: Color);
  164.             PROCEDURE (f: Frame) DrawPath (VAR p: ARRAY OF Point; n, s: LONGINT; col: Color;
  165.                                                                 path: INTEGER);
  166.             PROCEDURE (f: Frame) MarkRect (l, t, r, b, s: LONGINT; mode: INTEGER; show: BOOLEAN);
  167.             PROCEDURE (f: Frame) Input (VAR x, y: LONGINT; VAR isDown: BOOLEAN);
  168.             PROCEDURE (f: Frame) DrawString (x, y: LONGINT; col: Color; s: ARRAY OF CHAR;
  169.                                                                 font: Fonts.Font);
  170.             PROCEDURE (f: Frame) SaveRect (l, t, r, b: LONGINT; VAR res: LONGINT);
  171.             PROCEDURE (f: Frame) RestoreRect (l, t, r, b: LONGINT; disposeBuffer: BOOLEAN)
  172.         END;
  173. END Ports.
  174. DEFINITION Models;
  175.     IMPORT Domains, Stores;
  176.     TYPE
  177.         Model = POINTER TO ModelDesc;
  178.         ModelDesc = RECORD (Stores.ElemDesc)
  179.             PROCEDURE (m: Model) Clone (): Model
  180.         END;
  181.         Context = POINTER TO ContextDesc;
  182.         ContextDesc = RECORD
  183.             PROCEDURE (c: Context) ThisModel (): Model;
  184.             PROCEDURE (c: Context) GetSize (VAR w, h: LONGINT);
  185.             PROCEDURE (c: Context) SetSize (w, h: LONGINT)
  186.         END;
  187.         Message = RECORD (Domains.Message) END;
  188.         NeutralizeMsg = RECORD (Message) END;
  189.         UpdateMsg = RECORD (Message) END;
  190.     PROCEDURE Broadcast (model: Model; VAR msg: Message);
  191.     PROCEDURE BeginModification (m: Model);
  192.     PROCEDURE EndModification (m: Model);
  193.     PROCEDURE BeginScript (m: Model; name: Domains.OpName; VAR script: Domains.Operation);
  194.     PROCEDURE EndScript (m: Model; script: Domains.Operation);
  195.     PROCEDURE Do (m: Model; name: Domains.OpName; op: Domains.Operation);
  196. END Models.
  197. DEFINITION Views;
  198.     IMPORT Domains, Files, Fonts, Stores, Ports, Models;
  199.     CONST
  200.         undefined = 0; infinite = 29000 * Ports.mm;
  201.         transparent = 0FF000000H;
  202.         deep = FALSE; shallow = TRUE;
  203.         keepFrames = FALSE; rebuildFrames = TRUE;
  204.     TYPE
  205.         View = POINTER TO ViewDesc;
  206.         ViewDesc = RECORD (Stores.StoreDesc)
  207.             context-: Models.Context;
  208.             PROCEDURE (v: View) Clone (): View;
  209.             PROCEDURE (v: View) CopyFrom (source: View);
  210.             PROCEDURE (v: View) ThisModel (): Models.Model;
  211.             PROCEDURE (v: View) CopyModelFrom (source: View; shallow: BOOLEAN);
  212.             PROCEDURE (v: View) Neutralize;
  213.             PROCEDURE (v: View) Background (): Ports.Color;
  214.             PROCEDURE (v: View) Restore (f: Frame; l, t, r, b: LONGINT);
  215.             PROCEDURE (v: View) RestoreMarks (f: Frame; l, t, r, b: LONGINT);
  216.             PROCEDURE (v: View) HandleModelMsg (VAR msg: Models.Message);
  217.             PROCEDURE (v: View) HandleViewMsg (f: Frame; VAR msg: Message);
  218.             PROCEDURE (v: View) HandleCtrlMsg (f: Frame; VAR msg: CtrlMessage; VAR focus: View)
  219.         END;
  220.         Message = RECORD (Domains.Message) END;
  221.         CtrlMessage = RECORD END;
  222.         Frame = POINTER TO FrameDesc;
  223.         FrameDesc = RECORD (Ports.FrameDesc)
  224.             l-, t-, r-, b-: LONGINT
  225.         END;
  226.         Title = ARRAY 64 OF CHAR;
  227.     PROCEDURE Broadcast (v: View; VAR msg: Message);
  228.     PROCEDURE BeginModification (v: View);
  229.     PROCEDURE EndModification (v: View);
  230.     PROCEDURE BeginScript (v: View; name: Domains.OpName; VAR script: Domains.Operation);
  231.     PROCEDURE EndScript (v: View; script: Domains.Operation);
  232.     PROCEDURE Do (v: View; name: Domains.OpName; op: Domains.Operation);
  233.     PROCEDURE Update (v: View; rebuild: BOOLEAN);
  234.     PROCEDURE UpdateIn (v: View; l, t, r, b: LONGINT; rebuild: BOOLEAN);
  235.     PROCEDURE OldView (loc: Files.Locator; name: Files.Name): View;
  236.     PROCEDURE RegisterView (view: View; loc: Files.Locator; name: Files.Name);
  237.     PROCEDURE Open (view: View; loc: Files.Locator; name: Files.Name);
  238.     PROCEDURE OpenAux (view: View; title: Title);
  239.     PROCEDURE Deposit (view: View);
  240. END Views.
  241. DEFINITION Controllers;
  242.     IMPORT Fonts, Ports, Stores, Views;
  243.     CONST
  244.         now = 0;
  245.         cut = 0; copy = 1; pasteChar = 2; paste = 4;
  246.         doubleClick = 0; extend = 1; modifiy = 2;
  247.     TYPE
  248.         Controller = POINTER TO ControllerDesc;
  249.         ControllerDesc = RECORD (Stores.StoreDesc)
  250.             PROCEDURE (c: Controller) Clone (): Controller;
  251.             PROCEDURE (c: Controller) CopyFrom (source: Controller);
  252.             PROCEDURE (c: Controller) InitView (v: Views.View);
  253.             PROCEDURE (c: Controller) ThisView (): Views.View;
  254.             PROCEDURE (c: Controller) RestoreMarks (f: Views.Frame; l, t, r, b: LONGINT);
  255.             PROCEDURE (c: Controller) Neutralize;
  256.             PROCEDURE (c: Controller) HandleModelMsg (VAR msg: Models.Message);
  257.             PROCEDURE (c: Controller) HandleViewMsg (f: Views.Frame; VAR msg: Views.Message);
  258.             PROCEDURE (c: Controller) HandleCtrlMsg (f: Views.Frame; VAR msg: Message;
  259.                                                                             focus: Views.View)
  260.         END;
  261.         Directory = POINTER TO DirectoryDesc;
  262.         DirectoryDesc = RECORD
  263.             PROCEDURE (d: Directory) New (): Controller
  264.         END;
  265.         Action = POINTER TO ActionDesc;
  266.         ActionDesc = RECORD
  267.             PROCEDURE (a: Action) Do
  268.         END;
  269.         Message = Views.CtrlMessage;
  270.         PollOpsMsg = RECORD (Message)
  271.             type: Stores.TypeName;
  272.             pasteFrom: Views.View;
  273.             selectable, deselectable: BOOLEAN;
  274.             valid: SET
  275.         END;
  276.         TickMsg = RECORD (Message)
  277.             tick: LONGINT
  278.         END;
  279.         MarkMsg = RECORD (Message)
  280.             show: BOOLEAN
  281.         END;
  282.         SelectMsg = RECORD (Message)
  283.             set: BOOLEAN
  284.         END;
  285.         RequestMessage = RECORD (Message)
  286.             requestFocus: BOOLEAN
  287.         END;
  288.         EditMsg = RECORD (RequestMessage)
  289.             op: INTEGER;
  290.             modifiers: SET;
  291.             char: CHAR
  292.         END;
  293.         CursorMessage = RECORD (RequestMessage)
  294.             x, y: LONGINT
  295.         END;
  296.         PollCursorMsg = RECORD (CursorMessage)
  297.             cursor: INTEGER
  298.         END;
  299.         TrackMsg = RECORD (CursorMessage)
  300.             modifiers: SET
  301.         END;
  302.     VAR resolution-: LONGINT;
  303.     PROCEDURE FocusFrame (): Views.Frame;
  304.     PROCEDURE FocusView (): Views.View;
  305.     PROCEDURE FocusModel (): Models.Model;
  306.     PROCEDURE DoLater (a: Action; notBefore: LONGINT);
  307.     PROCEDURE Ticks (): LONGINT;
  308. END Controllers.
  309. DEFINITION Dialog;
  310.     IMPORT Files, Ports;
  311.     TYPE
  312.         String = ARRAY 256 OF CHAR;
  313.         Interactor = RECORD
  314.             PROCEDURE (VAR i: Interactor) Notify;
  315.             PROCEDURE (VAR i: Interactor) CheckGuards
  316.         END;
  317.     PROCEDURE MapParamString (in, p0, p1, p2: ARRAY OF CHAR; VAR out: ARRAY OF CHAR);
  318.     PROCEDURE MapString (in: ARRAY OF CHAR; VAR out: ARRAY OF CHAR);
  319.     PROCEDURE ShowParamMsg (str, p0, p1, p2: ARRAY OF CHAR);
  320.     PROCEDURE ShowMsg (str: ARRAY OF CHAR);
  321.     PROCEDURE ShowParamStatus (str, p0, p1, p2: ARRAY OF CHAR);
  322.     PROCEDURE ShowStatus (str: ARRAY OF CHAR);
  323.     PROCEDURE GetOK (str, p0, p1, p2: ARRAY OF CHAR; VAR ok: BOOLEAN);
  324.     PROCEDURE GetIntSpec (type: Files.Type; VAR stationary: BOOLEAN;
  325.                                             VAR loc: Files.Locator; VAR name: Files.Name);
  326.     PROCEDURE GetExtSpec (default: Files.Name; type: Files.Type; stationary: BOOLEAN;
  327.                                             VAR loc: Files.Locator; VAR name: Files.Name);
  328.     PROCEDURE GetColor (in: Ports.Color; VAR out: Ports.Color; VAR set: BOOLEAN);
  329.     PROCEDURE DayOfWeek (VAR t: Time): INTEGER;
  330.     PROCEDURE Call (proc, errorMsg: ARRAY OF CHAR; VAR res: LONGINT);
  331.     PROCEDURE Beep;
  332.     PROCEDURE Disable;
  333. END Dialog.
  334. DEFINITION TextModels;
  335.     IMPORT Fonts, Ports, Stores, Models, Views, Dialog, Containers;
  336.     CONST
  337.         viewcode = 2X; tab = 9X; line = 0DX; para = 0EX;
  338.         nbspace = 0A0X; digitspace = 8FX; hyphen = 90X; nbhyphen = 91X; softhyphen = 0ADX;
  339.     TYPE
  340.         Model = POINTER TO ModelDesc;
  341.         ModelDesc = RECORD (Containers.ModelDesc)
  342.             PROCEDURE (m: Model) Clone (): Model;
  343.             PROCEDURE (m: Model) Length (): LONGINT;
  344.             PROCEDURE (m: Model) NewReader (old: Reader): Reader;
  345.             PROCEDURE (m: Model) NewWriter (old: Writer): Writer;
  346.             PROCEDURE (m: Model) CopyFrom (pos: LONGINT; m0: Model; beg, end: LONGINT);
  347.             PROCEDURE (m: Model) CopyAllFrom (source: Containers.Model);
  348.             PROCEDURE (m: Model) MoveFrom (pos: LONGINT; m0: Model; beg, end: LONGINT);
  349.             PROCEDURE (m: Model) Append (m0: Model);
  350.             PROCEDURE (m: Model) Delete (beg, end: LONGINT);
  351.             PROCEDURE (m: Model) SetAttr (beg, end: LONGINT; attr: Attributes);
  352.             PROCEDURE (m: Model) ReplaceView (old, new: Views.View)
  353.         END;
  354.         Attributes = POINTER TO AttributesDesc;
  355.         AttributesDesc = RECORD (Stores.StoreDesc)
  356.             color-: Ports.Color;
  357.             font-: Fonts.Font;
  358.             offset-: LONGINT;
  359.             PROCEDURE (a: Attributes) Clone (): Attributes;
  360.             PROCEDURE (a: Attributes) CopyFrom (source: Attributes);
  361.             PROCEDURE (a: Attributes) Equals (b: Attributes): BOOLEAN
  362.         END;
  363.         Context = POINTER TO ContextDesc;
  364.         ContextDesc = RECORD (Models.ContextDesc)
  365.             PROCEDURE (c: Context) ThisModel (): Model
  366.             PROCEDURE (c: Context) Attr (): Attributes;
  367.             PROCEDURE (c: Context) Pos (): LONGINT
  368.         END;
  369.         Reader = POINTER TO ReaderDesc;
  370.         ReaderDesc = RECORD
  371.             eot: BOOLEAN;
  372.             type: SET;
  373.             attr: Attributes;
  374.             char: CHAR;
  375.             view: Views.View;
  376.             w, h: LONGINT;
  377.             PROCEDURE (rd: Reader) Base (): Model;
  378.             PROCEDURE (rd: Reader) Pos (): LONGINT;
  379.             PROCEDURE (rd: Reader) SetPos (pos: LONGINT);
  380.             PROCEDURE (rd: Reader) Read;
  381.             PROCEDURE (rd: Reader) ReadChar (VAR ch: CHAR);
  382.             PROCEDURE (rd: Reader) ReadView (VAR v: Views.View);
  383.             PROCEDURE (rd: Reader) ReadPrevView (VAR v: Views.View)
  384.         END;
  385.         Writer = POINTER TO WriterDesc;
  386.         WriterDesc = RECORD
  387.             attr-: Attributes;
  388.             PROCEDURE (wr: Writer) Base (): Model;
  389.             PROCEDURE (wr: Writer) Pos (): LONGINT;
  390.             PROCEDURE (wr: Writer) SetPos (pos: LONGINT);
  391.             PROCEDURE (wr: Writer) SetAttr (attr: Attributes);
  392.             PROCEDURE (wr: Writer) WriteChar (ch: CHAR);
  393.             PROCEDURE (wr: Writer) WriteView (view: Views.View; w, h: LONGINT)
  394.         END;
  395.         Directory = POINTER TO DirectoryDesc;
  396.         DirectoryDesc = RECORD
  397.             PROCEDURE (d: Directory) New (): Model
  398.         END;
  399.     VAR dir-: Directory;
  400.     PROCEDURE  NewColor (a: Attributes; color: Ports.Color): Attributes;
  401.     PROCEDURE  NewTypeface (a: Attributes; typeface: Fonts.Typeface): Attributes;
  402.     PROCEDURE  NewSize (a: Attributes; size: LONGINT): Attributes;
  403.     PROCEDURE  NewStyle (a: Attributes; style: SET): Attributes;
  404.     PROCEDURE  NewWeight (a: Attributes; weight: INTEGER): Attributes;
  405.     PROCEDURE  NewOffset (a: Attributes; offset: LONGINT): Attributes;
  406.     PROCEDURE  NewFont (a: Attributes; font: Fonts.Font): Attributes;
  407. END TextModels.
  408. DEFINITION TextMappers;
  409.     IMPORT Views, TextModels;
  410.     CONST
  411.         char = 0; string = 2; int = 4; real = 5; bool = 6; set = 7; view = 8; tab = 9; line = 10; para = 11;
  412.         eot = 30; invalid = 31;
  413.     TYPE
  414.         String = ARRAY 256 OF CHAR;
  415.         Scanner = RECORD
  416.             type: INTEGER;
  417.             start, lines, paras: LONGINT;
  418.             char: CHAR;
  419.             int: LONGINT;
  420.             real: LONGREAL;
  421.             bool: BOOLEAN;
  422.             set: SET;
  423.             len: INTEGER;
  424.             string: String;
  425.             view: Views.View; w, h: LONGINT;
  426.             PROCEDURE (VAR s: Scanner) ConnectTo (text: TextModels.Model);
  427.             PROCEDURE (VAR s: Scanner) Pos (): LONGINT;
  428.             PROCEDURE (VAR s: Scanner) SetPos (pos: LONGINT);
  429.             PROCEDURE (VAR s: Scanner) Scan
  430.         END;
  431.         Formatter = RECORD
  432.             PROCEDURE (VAR f: Formatter) ConnectTo (text: TextModels.Model);
  433.             PROCEDURE (VAR f: Formatter) Pos (): LONGINT;
  434.             PROCEDURE (VAR f: Formatter) SetPos (pos: LONGINT);
  435.             PROCEDURE (VAR f: Formatter) WriteChar (x: CHAR);
  436.             PROCEDURE (VAR f: Formatter) WriteInt (x: LONGINT);
  437.             PROCEDURE (VAR f: Formatter) WriteReal (x: LONGREAL);
  438.             PROCEDURE (VAR f: Formatter) WriteString (x: ARRAY OF CHAR);
  439.             PROCEDURE (VAR f: Formatter) WriteBool (x: BOOLEAN);
  440.             PROCEDURE (VAR f: Formatter) WriteSet (x: SET);
  441.             PROCEDURE (VAR f: Formatter) WriteTab;
  442.             PROCEDURE (VAR f: Formatter) WriteLn;
  443.             PROCEDURE (VAR f: Formatter) WritePara;
  444.             PROCEDURE (VAR f: Formatter) WriteView (v: Views.View);
  445.             PROCEDURE (VAR f: Formatter) WriteViewForm (v: Views.View; w, h: LONGINT)
  446.         END;
  447. END TextMappers.
  448. DEFINITION TextViews;
  449.     IMPORT Models, Views, Containers, TextModels, TextSetters;
  450.     CONST
  451.         show = FALSE; hide = TRUE;
  452.         any = FALSE; focusOnly = TRUE;
  453.     TYPE
  454.         View = POINTER TO ViewDesc;
  455.         ViewDesc = RECORD (Containers.ViewDesc)
  456.             PROCEDURE (v: View) Clone (): View;
  457.             PROCEDURE (v: View) ThisModel (): TextModels.Model;
  458.             PROCEDURE (v: View) DisplayMarks (hide: BOOLEAN);
  459.             PROCEDURE (v: View) HidesMarks (): BOOLEAN;
  460.             PROCEDURE (v: View) SetOrigin (org, dy: LONGINT);
  461.             PROCEDURE (v: View) PollOrigin (VAR org, dy: LONGINT);
  462.             PROCEDURE (v: View) GetThisLocation (f: Views.Frame; pos: LONGINT; VAR loc: Location);
  463.             PROCEDURE (v: View) GetRange (f: Views.Frame; VAR beg, end: LONGINT);
  464.             PROCEDURE (v: View) ThisPos (f: Views.Frame; x, y: LONGINT): LONGINT;
  465.             PROCEDURE (v: View) ShowRangeIn (f: Views.Frame; beg, end: LONGINT);
  466.             PROCEDURE (v: View) ShowRange (beg, end: LONGINT; focusOnly: BOOLEAN)
  467.         END;
  468.         Directory = POINTER TO DirectoryDesc;
  469.         DirectoryDesc = RECORD
  470.             PROCEDURE (d: Directory) New (text: TextModels.Model): View;
  471.             PROCEDURE (d: Directory) StdNew () : View
  472.         END;
  473.         Location = RECORD
  474.             start, pos: LONGINT;
  475.             x, y: LONGINT;
  476.             asc, dsc: LONGINT;
  477.             view: Views.View;
  478.             l, t, r, b: LONGINT
  479.         END;
  480.     VAR dir-: Directory;
  481.     PROCEDURE Focus (): View;
  482.     PROCEDURE FocusText (): TextModels.Model;
  483.     PROCEDURE ShowRange (text: TextModels.Model; beg, end: LONGINT; focusOnly: BOOLEAN);
  484.     PROCEDURE ThisRuler (v: View; pos: LONGINT): TextRulers.Ruler;
  485. END TextViews.
  486. DEFINITION TextControllers;
  487.     IMPORT Models, Views, Containers, TextModels, TextViews;
  488.     CONST
  489.         noAutoScroll = 16; noAutoIndent = 17;
  490.         none = -1;
  491.     TYPE
  492.         LONGCHAR = INTEGER;
  493.         Controller = POINTER TO ControllerDesc;
  494.         ControllerDesc = RECORD (Containers.ControllerDesc)
  495.             view-: TextViews.View;
  496.             text-: TextModels.Model;
  497.             PROCEDURE (c: Controller) Clone (): Controller;
  498.             PROCEDURE (c: Controller) CaretPos (): LONGINT;
  499.             PROCEDURE (c: Controller) SetCaret (pos: LONGINT);
  500.             PROCEDURE (c: Controller) GetSelection (VAR beg, end: LONGINT);
  501.             PROCEDURE (c: Controller) SetSelection (beg, end: LONGINT)
  502.         END;
  503.         Directory = POINTER TO DirectoryDesc;
  504.         DirectoryDesc = RECORD (Containers.DirectoryDesc)
  505.             PROCEDURE (d: Directory) NewController (opts: SET): Controller;
  506.             PROCEDURE (d: Directory) New (): Controller
  507.         END;
  508.     VAR dir-: Directory;
  509.     PROCEDURE Focus (): Controller;
  510.     PROCEDURE SetCaret (text: TextModels.Model; pos: LONGINT);
  511.     PROCEDURE SetSelection (text: TextModels.Model; beg, end: LONGINT);
  512. END TextControllers.
  513. TextControllers.StdCtrlDesc
  514. TextControllers.ControllerDesc
  515. Containers.ControllerDesc
  516. Controllers.ControllerDesc
  517. TextRulers.StdRulerDesc
  518. TextRulers.RulerDesc
  519. TextRulers.StdStyleDesc
  520. TextRulers.StyleDesc
  521. TextRulers.AttributesDesc
  522. Geneva
  523. Documents.ControllerDesc
  524.